<?PHP
include("../public/common.php");
include("../config/connect.php");
// 和客户端对接
if (isset($_SERVER["HTTP_GWT_USERID"]))
	setcookie("gwt_userid", $_SERVER["HTTP_GWT_USERID"],time()+100*3600*24, "/",".gouwutu.com");
if (isset($_SERVER["HTTP_GWT_ZFB"]))
	setcookie("gwt_zfb", $_SERVER["HTTP_GWT_ZFB"],time()+100*3600*24, "/",".gouwutu.com");
?>
<?PHP 
$userid = isset($_COOKIE["gwt_userid"]) ? $_COOKIE["gwt_userid"] : "";
$zfb = isset($_COOKIE["gwt_zfb"]) ? $_COOKIE["gwt_zfb"] : "";
$phone = isset($_COOKIE["gwt_phone"]) ? $_COOKIE["gwt_phone"] : "";
$email = isset($_COOKIE["gwt_email"]) ? $_COOKIE["gwt_email"] : "";

// 更新cache数据
date_default_timezone_set("Asia/Chongqing");
require_once("../taobaoapi/funs.php");

//
$sql = "select id from cache_items order by id desc limit 1";
$result = mysql_query( $sql );
if (mysql_num_rows($result) > 0)
{
	$row = mysql_fetch_assoc( $result );
	$idbase = $row["id"];
}
else
	$idbase = 1;
	
$sql = "select id,pay_time,real_pay_fee,num_iid,item_title,commission from report_items where id > $idbase order by id limit 10";
$result = mysql_query( $sql );
while( $result && $row = mysql_fetch_assoc( $result ))
{
	$json = json_decode(GetItemInfo($row["num_iid"]));
	if ($json->code == 1)
	{
	 	$pic_url = $json->pic_url;
		$url = $json->detail_url;
		if ($pic_url != "")
		{
			$sql = "insert into cache_items (id, time, fee, num_iid, item_title, commission, pic_url, url) values 
			(".$row["id"].",'".$row["pay_time"]."',".$row["real_pay_fee"].",'".$row["num_iid"]."','".$row["item_title"]."',".$row["commission"].",'$pic_url','$url')";
			mysql_query( $sql );
//			if (mysql_affected_rows() > 0)
//				$nHasInsert++;
		}
	}
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=7" /> 
<meta name ="keywords" content="购物兔,购物兔返现网,购物兔省钱浏览器,聚划算返利,返现网,返利网,返利,淘宝网返利,商城返利,京东返利,淘宝网女装返利,淘宝网女鞋打折,淘宝网男装促销,淘宝网包包秒杀,淘宝化妆品赠送"/>
<meta name="Description" content="购物兔是国内最知名的购物省钱浏览器，返现最快，当天内直接到账，返现最安全，100%不漏单；无论您在淘宝网，还是京东、当当等其他商城购物，即使是促销价也能返现，实现折上再打折，真正省钱，是您网络购物省钱的首选！" />
<title>购物兔返现网-去淘宝网、京东、当当等商城购物，确认收货即可拿现金，赚兔币，换礼品！</title>
<meta name="robots" content="index, follow" />
<meta name="googlebot" content="index, follow" />
<link type="text/css" rel="stylesheet" href="css/global.css" />
<script language="javascript" src="js/jquery.min.js"></script>
<script language="javascript" src="js/common.js"></script>
<script type="text/javascript" src="http://www.gouwutu.com/new/js/ScrollPic.js"></script>
<!--[if IE 6]>
<script>
document.execCommand("BackgroundImageCache", false, true);
</script>
<![endif]-->
<style type="text/css">
/* CSS Document */
/*******/
.GWT_newBuy { width:800px; margin:0 auto; overflow:hidden;}
.being_bought{height:240px;width:800px;margin-bottom:10px;border-bottom: 1px dashed #dedede;padding-bottom:10px;}
.being_bought_top{ text-align:left;padding-left:47px;color: #f15a22;font-family: "MicroSoft YaHei","SimHei",Arial,Helvetica,sans-serif;font-size: 15px;height:35px;line-height: 35px;}
.bought_cen{height:210px;overflow: hidden; width:800px;zoom:1;}
.bought_cen_list{overflow: hidden;width:730px;float:left; display:inline}
.bought_cen_list ul{float:left}
.bought_cen .bought_LeftBotton,.bought_cen .bought_RightBotton {cursor: pointer;float: left;height:57px;width:35px; padding:70px 0}
.bought_cen .bought_LeftBotton a,.bought_cen .bought_RightBotton a{display: block;height:57px;width:35px;text-indent: -9999px;overflow: hidden;}
.bought_cen .bought_LeftBotton a {background:url(http://www.tusijie.com/my/activity/img/bought_hover.gif) no-repeat top left;}
.bought_cen .bought_RightBotton a{background:url(http://www.tusijie.com/my/activity/img/bought_hover.gif) no-repeat top right;}
.bought_cen .bought_LeftBotton a:hover{background-position: bottom left}
.bought_cen .bought_RightBotton a:hover{background-position: bottom right;}
.bought_cen li{float:left;overflow:hidden;padding-right:13px;vertical-align:top;width:135px;}
.bought_cen li.p_none{padding-right:0px;}
.bought_cen li a.product_img{display: table-cell;height:131px;text-align: center;vertical-align: middle;width:131px;border: 1px solid #e5e5e5; padding:1px;*display: block;*font-size:114px;*font-family:Arial;}
.bought_cen li a:hover.product_img { border: 1px solid #FA6003;}
.bought_cen li img{height:131px;width:131px;vertical-align: middle;}
.bought_cen a:link, .bought_cen a:visited {color: #858585;}
.bought_cen a:hover{ text-decoration:underline;color: #FA6003;}
.bought_cen li h3{font-size: 12px;width:135px; overflow:hidden;font-weight: normal;height: 32px;line-height: 16px;margin-top: 5px;}
.bought_cen li h3 a:link,.product_list li h3 a:visited{ text-decoration:none;color:#858585}
.bought_cen li h3 a:hover{ color:#FA6003;text-decoration:underline }
.bought_cen li p .price{color: #C7000B;font-size: 14px;font-weight: bold;}
.bought_cen li span.moer a:link, .product_list li span.moer a:visited {color: #1a66b3;}
.bought_cen li span.moer a:hover{ text-decoration:underline}

#jc { background:url(../images/jc.jpg) no-repeat; height:77px; width:639px; margin-left:10px; position:relative;}
#jc a { width:39px; height:82px;position:absolute; top:0; right:10px; overflow:hidden; line-height:200px;} 
</style>
</head>
<body class="EverydayHome">
<?php
include("qqplus_header.php");
?>
<div id="m">
	<p id="lg"><img height="158" width="307" usemap="#mp" src="images/sylogo.jpg"></p>
    <p id="nv" style="position:relative;">
    	<b>淘宝返利</b>
  	</p>
    <div id="fm">
    	<form action="q/" method="get" onsubmit="return Adjust('kw')">
        	<p class="gwt_ss"><input type="text" maxlength="1024" id="kw" name="q" autocomplete="on" onBlur="if(this.value==''){this.value='输入您想要的宝贝名称或网址~';this.style.color = '#BABABA';}" onFocus="if(this.value=='输入您想要的宝贝名称或网址~'){this.value='';this.style.color = '#333';} this.select();" value="输入您想要的宝贝名称或网址~" /></p>
            <p class="btn_wr"><input type="submit" onmouseout="" onmousedown="" class="btn" id="su" value=""></p>
            <input type="hidden" name="id" id="id" value="" />
            <input type="hidden" name="url" id="url" value="" />
     	</form>
  	</div>
    <p class="tsearch-hot">
        <!-- 热门标签 -->
        <span>热门搜索：</span>
        <a href="http://www.gouwutu.com/new/q/?q=<?php echo urlencode('雪地靴'); ?>">雪地靴</a>
        <a href="http://www.gouwutu.com/new/q/?q=<?php echo urlencode('打底裤'); ?>">打底裤</a>
        <a class="h" href="http://www.gouwutu.com/new/q/?q=<?php echo urlencode('棉衣'); ?>">棉衣</a>
        <a href="http://www.gouwutu.com/new/q/?q=<?php echo urlencode('毛线围巾'); ?>">毛线围巾</a>
        <a href="http://www.gouwutu.com/new/q/?q=<?php echo urlencode('羽绒服'); ?>">羽绒服</a>
        <a href="http://www.gouwutu.com/new/q/?q=<?php echo urlencode('长款毛衣'); ?>">长款毛衣</a>
        <a href="http://www.gouwutu.com/new/q/?q=<?php echo urlencode('外套'); ?>">外套</a>
        <a href="http://www.gouwutu.com/new/q/?q=<?php echo urlencode('圣诞树'); ?>">圣诞树</a>
        <a href="http://www.gouwutu.com/top/index.php" class="more" target="_blank">更多</a>
        <b class="gr-l"></b>
        <b class="gr-r"></b>
        <!--end-->
    </p>
    <p id="jc" style="background:url(images/jc.png) no-repeat center top; margin-left:22px; height:82px;"><a title="点击进入详情帮助" href="http://www.gouwutu.com/faq/help_faq1_01.html" target="_blank">新手指南</a></p><!-----3步骤------>
</div>
<!------兔丝最新购买------>
<div class="GWT_newBuy">
	<div id="Iframes">
   		<div class="being_bought">
	<h3 class="being_bought_top">兔丝最新购买</h3>
    <div id="bought_page" class="bought_cen">
    	<div class="bought_LeftBotton" id="LeftArr">
        	<span title="Back" class="bought_cen_left">
        		<a href="javascript:;">向左</a>
        	</span>
        </div>
        <div class="bought_cen_list" id="ISL_Cont_1">
            <div>
            <ul id="List1_1">
            <?php
			//$sql = "select * from fanwe_share_goods order by rand(now()) limit 25";
			$sql = "select num_iid, pic_url, url, item_title, time, fee, commission from cache_items where pic_url<>'' group by num_iid order by time desc limit 25";
			$result = mysql_query( $sql );
			while( $result && $row = mysql_fetch_assoc( $result ))
			{
            ?>
                <li>
                    <a href="http://www.gouwutu.com/new/q/?id=<?php echo $row["num_iid"]; ?>&q=<?PHP echo urlencode($row["item_title"]); ?>" class="product_img" title="省：<?PHP echo round($row["commission"] * 0.6, 2); ?>元"><img alt="<?PHP echo $row["item_title"]; ?>" src="<?PHP echo $row["pic_url"]."_170x170.jpg"; ?>"> </a>               
                    <h3><a href="http://www.gouwutu.com/new/q/?id=<?php echo $row["num_iid"]; ?>&q=<?PHP echo urlencode($row["item_title"]); ?>" title="<?PHP echo $row["item_title"]; ?>" ><?PHP echo $row["item_title"]; ?></a></h3> 
                    <p>优惠价：<b class="price">￥<?PHP echo $row["fee"]; ?></b></p>
                    <p>还可返：<span class="price">￥<?PHP echo round($row["commission"] * 0.6, 2); ?></span></p>
                </li>
            <?php } ?>     
            </ul>
            </div>
        </div>
        <div class="bought_RightBotton" id="RightArr">
        	<span class="bought_cen_right">
        		<a title="Next" href="javascript:;">向右</a>
        	</span>
        </div>
    </div>
</div>
<SCRIPT language=javascript type=text/javascript>
<!--//--><![CDATA[//><!--
var scrollPic_02 = new ScrollPic();
scrollPic_02.scrollContId   = "ISL_Cont_1"; //内容容器ID
scrollPic_02.arrLeftId      = "LeftArr";//左箭头ID
scrollPic_02.arrRightId     = "RightArr"; //右箭头ID

scrollPic_02.frameWidth     = 730;//显示框宽度
scrollPic_02.pageWidth      = 444; //翻页宽度

scrollPic_02.speed          = 10; //移动速度(单位毫秒，越小越快)
scrollPic_02.space          = 20; //每次移动像素(单位px，越大越快)
scrollPic_02.autoPlay       = true; //自动播放
scrollPic_02.autoPlayTime   = 5; //自动播放间隔时间(秒)
scrollPic_02.initialize(); //初始化
					
//--><!]]>
</SCRIPT>	
    </div>
</div>
</body>
</html>

<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-20984072-1");
pageTracker._trackPageview();
} catch(err) {}</script>

<script type="text/javascript">
var _bdhmProtocol = (("https:" == document.location.protocol) ? " https://" : " http://");
document.write(unescape("%3Cscript src='" + _bdhmProtocol + "hm.baidu.com/h.js%3F7eb75a7b189f4a709dead85bc20eb0dd' type='text/javascript'%3E%3C/script%3E"));
</script>
